#ifndef ITEMLIST_H_
#define ITEMLIST_H_

#include <iostream>
#include "SDL/SDL_ttf.h"
#include "../../common/Constantes.h"
#include "../../common/utils/Logger.h"
#include "../Parcel.h"
#include "../Event.h"
#include "../Widget.h"
#include "./Button.h"
#include "./ButtonListItem.h"

class Item{
public:
	Item (std::string name, bool selected = false){this->name = name; this->selected = selected;}
	std::string name;
	bool selected;
};

class ItemList: public Widget {

public:
	ItemList (int posX, int posY, Widget* parent);

	virtual void handleEvent(Event event);
	virtual void resolve();
	virtual void showOn(SDL_Surface* surface);
	virtual ~ItemList();
	std::string getSelected();
protected:
	std::list<Item*> listItems;
	int cantItems;
	std::string keySelected;
	void fillButtonList();
	std::list<ButtonListItem*> buttonList;
};

#endif /* ITEMLIST_H_ */
